API Documentation
Static Public Member Functions | List of all members
nkAstraeus::PbsEnvMapFilter Class Referencefinal

Provides tools to filter environment maps and improve IBL within PbsMaterial. More...

Static Public Member Functions

static void requestEnvMapFiltering (nkGraphics::Texture *envMap, nkGraphics::Texture *outFilteredMap, unsigned int outPixelDims=128)
 

Detailed Description

Provides tools to filter environment maps and improve IBL within PbsMaterial.

This tool generates pre-filtered environment maps, which can be used within the PbsMaterial. Generated maps correspond to the first element of the split-sum introduced by Epic to simplify IBL. This tool can be used to improve performances for the material, as it requires a lot less samples than the standard way.

Member Function Documentation

◆ requestEnvMapFiltering()

static void nkAstraeus::PbsEnvMapFilter::requestEnvMapFiltering ( nkGraphics::Texture envMap,
nkGraphics::Texture outFilteredMap,
unsigned int  outPixelDims = 128 
)
static

Requests the filtering of an environment map.

This tool accepts cube maps and spherical environment maps.

For best result, it is advised to provide an environment map with its full mip chain available. The filtering will be able to interpolate better the roughness levels and this will help in reducing noise in the final result, for rough parameters.

Parameters
envMapThe environment map to filter. Can be a cube-map or a spherical environment map.
outFilteredMapThe texture in which to output the result. The texture will be a cube map at the end of the processing.
outPixelDimsThe size, in pixels, of one face of the resulting cube map. The face will be of dimensions outPixelDims x outPixelDims.
Remarks
To ensure result is correct, the envMap needs to be fully loaded. If it is loading when issuing the call, the filtering result might end up all black.

The documentation for this class was generated from the following file: